This lesson is part of the Vision Components and Property Bindings course. You can browse the rest of the lessons below.

LESSON LIST

Autoplay Off

Description

Learn how to make one or more cells inside a dataset dynamic, which is particularly useful for working with components (such as the Linear Scale or Easy Chart) that store configuration information in datasets.

Video recorded using: Ignition 8.1

Transcript

(open in window)

[00:00] In this lesson, we'll demonstrate the use of cell update binding. Cell update binding is applicable to components such as a Linear Scale or an Easy Chart, which stores some of their configuration information as datasets. For such dataset parameters, cell update binding makes it possible to reference and bind to individual cell elements of a dataset, thereby making them dynamic. We'll begin with these two default components from the palette, a Linear Scale and a Slider. Note that by resizing the Linear Scale to make it wide rather than tall. Then resizing it again a little bit. We can turn this into a horizontal element. If we right click on the Linear Scale and select Customizers > Scale Indicators, we'll see that we have a green low indicator at a value of 15, and a red high indicator at a value of 85, as well as other customizations that we can configure. Let's add one more indicator, perhaps an arrow to indicate some current value.

[01:06] So we'll click add, then we'll specify an arrow with a value of maybe 55 and a length of 50, and we'll color it blue, and then we'll click OK. And we've added an arrow just as specified. Next down here in the Property Editor, we see a property called Indicators. We see that it's now a 3x9 dataset. If we click on the dataset to inspect it, and widen this window a little bit, we see that there's a row for each of the 3 indicators, and each of its properties occupies one cell. in this dataset. What we want to do is bind some of these individual elements in the dataset to some tags or component properties. We can do this using cell update bindings, and again, this binding type only exists for datasets, such as this one. To create some cell update bindings, this time we'll click on the Indicators property, its binding icon, then select the cell update binding type.

[02:10] The top portion is the dataset we already saw. We want to add bindings for the three cells in the value field to a couple existing tags and to a component property. Let's start with the indicator low value setpoint. We will click on the desired dataset cell. Then in the cell binding section, we'll click on add, and a row is added with a selected row and column specified. Then the value cell is where we can create an individual binding to a property or a tag. We wanna bind to a tag, so we will click the Insert Tag button, then navigate to our scale low setpoint tag and click OK. Now this one specific dataset cell has a cell update binding to a desired tag. Let's repeat the process for the indicator high value setpoint. Once again, we'll click on the dataset cell of interest, the value. Then we'll click add and the value binding.

[03:07] We'll click on Insert Tag. Then we'll navigate to the tags and select the scale high setpoint tag, and click OK. Then as for the arrow indicator, let's do a sell update binding to a slider instead. So again, we'll click on the dataset cell of interest, the value, we'll click add, click on the value binding. This time we'll click on the property value button instead. Then we'll navigate down to the Slider and select its value property, and click OK. And at this point we've created all three desired cell update bindings. So we'll click okay. Now let's test out our cell update bindings. First we'll head to the top toolbar and set the tags to read-write, then toggle into Preview Mode. Then down in the Tag Browser, we'll set the low setpoint to let's say 25, and we see the green indicator reset.

[04:05] And we'll set the high setpoint to 75, and we see the red indicator reset. And we'll move this slider around a little bit, and we see that the blue arrow indicator is tracking it as expected. So in this lesson, we've seen how to use cell update binding to make the parameters of a linear scale component dynamic. Cell update binding is specific to datasets. It's useful when trying to bind to specific component parameters when they're stored as part of a dataset, if there is no other way to bind to such parameters as individual scalar values.

You are editing this transcript.

Make any corrections to improve this transcript. We'll review any changes before posting them.